using System.Collections;
using DG.Tweening;
using UnityEngine;

public class DoScaleByMouse : MonoBehaviour
{
    private IEnumerator OnMouseDown()
    {
        GameManager.m_Instance.m_ChooseState = EChooseState.Scale;
        while (Input.GetMouseButton(0))
        {
            float scrollValue = Input.GetAxis("Mouse ScrollWheel");
            if (scrollValue < 0)
            {
                transform.DOScale(Vector3.one * 4, 1);
            }
            else
            {
                transform.DOScale(Vector3.one, 1);
            }
            yield return new WaitForFixedUpdate();
        }
    }

    private void OnMouseUp()
    {
        GameManager.m_Instance.m_ChooseState = EChooseState.None;
        transform.DOScale(Vector3.one, 1);
    }
}
